<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<title>Lolifier</title>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	</head>
	<body>
		<form action="." method="post">
			<label for="source">Enter text to lolify:</label><br/>
			<textarea name="source" id="source" rows="10" cols="80"><?php if(isset($_REQUEST['source'])) echo htmlspecialchars($_REQUEST['source']); else echo "i have a bucket."; ?></textarea>
			<input type="submit" value="Translate text"/>
		</form>
		<?php
			if(isset($_REQUEST['source'])) {
				echo '<div style="padding: 10px; border: 1px solid #bbb; font-family: Arial Black; font-size: 28px;">';
				require("classes/common.inc.php");
				$t = new Translator("lol-english");
				echo htmlspecialchars($t->translate($_REQUEST['source']));
				echo '</div>'; 
			}
		?>
	</body>
</html>